<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__CSS__/layui.css">
    <link rel="stylesheet" href="__CSS__/view.css"/>
    <link rel="icon" href="/favicon.ico">
    <title>个人资料</title>
</head>
<body class="layui-view-body">
    <div class="layui-content">
        <div class="layui-row">
              <div class="layui-card">
                  <form class="layui-form layui-card-body" id="doform">
                    <div class="layui-form-item">
                      <label class="layui-form-label">开户人</label>
                      <div class="layui-input-block">
                        <input type="text" name="card_name" required="" lay-verify="required" placeholder="请输入开户人姓名" autocomplete="off" id="card_name" value="{$data['card_name']}" class="layui-input">
                      </div>
                    </div>
                    <div class="layui-form-item">
                      <label class="layui-form-label">所属银行</label>
                      <div class="layui-input-block">
                        <select name="card_bank_id" lay-verify="required">
                          <option value=""></option>
                          {volist name="bank" id="vo"}
                            <option value="{$vo.list_id}" {if $vo.list_id==$data['card_bank_id']}selected{/if}>{$vo.list_name}</option>
                          {/volist}

                        </select>

                      </div>
                    </div>
                    <div class="layui-form-item">
                      <label class="layui-form-label">银行卡号</label>
                      <div class="layui-input-block">
                        <input type="text" name="card_no" required="" lay-verify="required" placeholder="请输入卡号" autocomplete="off" value="{$data['card_no']}" id="card_no" class="layui-input">
                      </div>
                    </div>
                    <input type="hidden" name="card_id" value="{$data['card_id']}">
                    <div class="layui-form-item">
                      <label class="layui-form-label">预留电话</label>
                      <div class="layui-input-block">
                        <input type="text" name="card_phone" required="" lay-verify="required" placeholder="请输入银行预留电话" autocomplete="off" value="{$data['card_phone']}" id="card_phone" class="layui-input">
                      </div>
                    </div>
                    <div class="layui-form-item">
                      <label class="layui-form-label">开户省</label>
                      <div class="layui-input-inline">
                        <input type="text" name="card_province" required="" value="{$data['card_province']}" id="card_province" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                      </div>
                      <label class="layui-form-label">开户市</label>
                      <div class="layui-input-inline">
                        <input type="text" name="card_city" required="" value="{$data['card_city']}" id="card_city" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                      </div>
                    </div>
                    
                    <div class="layui-form-item">
                      <div class="layui-input-block">
                        <a id="formDemo" class="layui-btn layui-btn-blue" lay-submit="" lay-filter="formDemo">保存</a>
                      </div>
                    </div>
                  </form>  
              </div>
        </div>
    </div>
    <script src="__JS__/layui.all.js"></script>
    <script src="__JS__/jquery.min.js"></script>

    <script>
        
        $('#formDemo').click(function(){
            var urls = "{:Url('Agent/Withdrwal/crdcags')}";
            var data = $('#doform').serialize();

            $.post(urls, data, function(e){
                if(e.error==0){
                    layer.msg(e.msg);
                    setTimeout(function(){
                        // location.reload();
                        parent.location.reload();
                    },1500) 
                }else if(e.error==1){
                    layer.msg(e.msg);
                }
            });
        });

    </script>

</body></html>